﻿<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Rating system</title>
    @Styles.Render("~/Content/css")
    @Scripts.Render("~/bundles/modernizr")

</head>
<body>
    <div class="navbar navbar-inverse navbar-fixed-top">
        <div class="container">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                @Html.ActionLink("Имя приложения", "Index", "Home", null, new { @class = "navbar-brand" })
            </div>
            <div class="navbar-collapse collapse">
                <ul class="nav navbar-nav">
                    @if(User.IsInRole("teacher"))
                    {
                        <li>@Html.ActionLink("Рейтинговые ведомости", "ListDocuments")</li>
                        <li>@Html.ActionLink("Группы", "ListGroups")</li>
                    }
                    else
                    {
                        if (User.IsInRole("starosta"))
                        {
                            <li>@Html.ActionLink("Группа", "ListGroup", new { starostaId = User.Identity.Name })</li>
                        }
                        <li>@Html.ActionLink("Ведомости", "ShowDocuments")</li>
                    }
                </ul>
                <!-- Logout link -->
               @using (Html.BeginForm("LogOff", "Account", FormMethod.Post, new { id = "logoutForm", @class = "navbar-right" }))
               {
                   <ul class="nav navbar-nav navbar-right">
                        <li><a href="javascript:document.getElementById('logoutForm').submit()">Выйти</a></li>
                   </ul>
               }
            </div>
        </div>
    </div>
    <div class="container body-content">
        @RenderBody()
        <hr />
        <footer>
            <p>&copy; @DateTime.Now.Year – приложение ASP.NET</p>
        </footer>
    </div>

    @Scripts.Render("~/bundles/jquery")
    @Scripts.Render("~/bundles/bootstrap")
    @RenderSection("scripts", required: false)
</body>
</html>
